import java.io.*;

public class IODemo2 {
    public static void main(String[] args) throws IOException {
        //末尾添加true等于追加写，不清空文件内容，把新的内容添加到文件队尾
        try(OutputStream outputStream =new FileOutputStream("./test.txt",true)){
            byte[] buffer =new byte[]{97,98,99};
            outputStream.write(buffer);
        }catch(IOException e){
            throw new RuntimeException(e);
        }
    }

}
